
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title></title>
</head>
<script src="../js/jquery-3.4.1.min.js"></script>
<script>
	$(function(){
		$(".box1").css({"backgroundColor":"aqua","height":"80px"});
		$(".box2").css({"backgroundColor":"red","height":"80px","position":"sticky","top":"0px"});
		$(".box3").css({"height":"500px","background-color":"blue"});
		$(".box4").css({"height":"500px","background-color":"green"});
	}
	);
</script>

<body>
    <div class="box1"></div>
    <div class="box2">
        
    </div>
    <div class="box3"></div>
    <div class="box4"></div>
</body>
</html>

